package com.snowleopard.findpeople.dao.account;

import java.util.List;

import org.hibernate.criterion.Restrictions;
import org.springframework.stereotype.Component;
import org.springside.modules.orm.hibernate.HibernateDao;

import com.snowleopard.findpeople.entity.account.Authority;

/**
 * 授权对象的泛型DAO.
 * 
 * @author LiuJian
 */
@Component
public class AuthorityDao extends HibernateDao<Authority, String> {

	@SuppressWarnings("unchecked")
	public List<Authority> getAuthorityWithInterceptUrl() {
		return super.getSession().createCriteria(Authority.class).add(Restrictions.isNotNull("interceptUrl")).list();
	}
}
